<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册</title>
    <link href="../css/reg.css" rel="stylesheet" type="text/css" >
    <script src="../js/jquery-3.6.0.js" type="text/javascript"></script>

    <script type="text/javascript">
     $(function (){
         $("#zh1").blur(function (){
             var ipone = $("#zh1").val();
             $.ajax({
                 type:"get",
                 url:"http://localhost:8080/tomcat_dome1_war/verify?zh="+ipone,
                 success : function (mate){
                     var span1 = $("#idc");
                     span1.html(mate);
                 },
                 error: function (mate){
                     var span1 = $("#idc");
                     span1.html(mate);
                 }
             });

         });
     })

    </script>
</head>

<body>
<h2>请注册</h2>

<form action="../niubiservlet" method="get">

    <table width="100%">
        <tr>
            <td align="right">账户:</td>
            <td><input type="text" name="zh" id="zh1"/></td>
            <span id="idc" style="color: #03a9f4"></span>

        </tr>
        <td></td>
        <tr>
            <td align="right">创建密码:</td>
            <td><input type="password" name="pwd"/></td>
        </tr>

        <tr>
            <td align="right">真实姓名:</td>
            <td><input type="text" name="username"/></td>
        </tr>

        <tr>
            <td align="right">性别:</td>
            <td><input type="radio" name="sex" value="nv"/>女<input type="radio" name="sex" value="nan"/>男</td>
        </tr>

        <tr>
            <td align="right">出生年月:</td>
            <td>
                <select name="year" />
                <option value="1996">1996</option>
                <option value="1996">1997</option>
                <option value="1996">1998</option>
                <option value="1996">1999</option>
                </select>年

                <select name="mounth" />
                <option value="1">1</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
                </select>月

                <select name="day" />
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                </select>日
            </td>

        </tr>
        <tr>
            <td align="right">职业:</td>
            <td>
                <select name="now" />
                <option value="student">学生</option>
                <option value="work">工作</option>
                <option value="teacher">教师</option>
                </select>

            </td>

        </tr>

        </tr>
        <tr>
        </tr>

        <td align="right">发送验证码:</td>
        <td><input type="text" name="check"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="text"></td>

        <tr>
        </tr>

        <td>&nbsp</td>
        <td><input type="submit" value="完成注册" name="zc">&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="reset" value="重置" name="cz">
        </td>
        <tr>


    </table >

</form>

</body>
</html>